package cn.dzz.springcloud.service;

import cn.dzz.springcloud.dao.PaymentDao;
import cn.dzz.springcloud.entity.Payment;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author ArkD42
 * @file SpringCloud-ATGG-2020
 * @create 2020年08月24日 21:26
 */

@Service
public class PaymentServiceImpl implements PaymentService{

    @Autowired
    private PaymentDao paymentDao;

    @Override
    public int addPayment(Payment payment) {
        return paymentDao.insertPayment(payment);
    }

    @Override
    public Payment getPaymentById(Long paymentId) {
        return paymentDao.queryPaymentById(paymentId);
    }
}
